/*
 * Copyright (c) 2024 Black Sesame Technologies
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <gtest/gtest.h>

#include "dal/qos_policy.h"

TEST(test_dal_qos_policy, dal_create_and_delete_default_qos_policy)
{
    dal_domain_participant_qos_t* participant_qos = dal_create_default_participant_qos();
    EXPECT_NE(participant_qos, nullptr);
    dal_delete_participant_qos(participant_qos);

    dal_topic_qos_t* topic_qos = dal_create_default_topic_qos();
    EXPECT_NE(topic_qos, nullptr);
    dal_delete_topic_qos(topic_qos);

    dal_publisher_qos_t* publisher_qos = dal_create_default_publisher_qos();
    EXPECT_NE(publisher_qos, nullptr);
    dal_delete_publisher_qos(publisher_qos);

    dal_subscriber_qos_t* subscriber_qos = dal_create_default_subscriber_qos();
    EXPECT_NE(subscriber_qos, nullptr);
    dal_delete_subscriber_qos(subscriber_qos);

    dal_datawriter_qos_t* datawriter_qos = dal_create_default_datawriter_qos();
    EXPECT_NE(datawriter_qos, nullptr);
    dal_delete_datawriter_qos(datawriter_qos);

    dal_datareader_qos_t* datareader_qos = dal_create_default_datareader_qos();
    EXPECT_NE(datareader_qos, nullptr);
    dal_delete_datareader_qos(datareader_qos);
}